﻿package flow {
	import flash.display.MovieClip;
	import flash.utils.setInterval;
	import caurina.transitions.Tweener;
	
	public class MuiTen extends MovieClip {
		public function MuiTen() {
			this.z = 0;
			this.rotation = 6 * new Date().getSeconds();
			setInterval(tick, 1000);
		}
		
		private function tick(){
			var d:Date = new Date();
			var r:Number = d.getSeconds() == 0 ? 360 : 6 * d.getSeconds();
			Tweener.addTween(this, {time:.5, rotation:r, onComplete:tick_complete});
		}
		
		private function tick_complete(){
			if(this.rotation == 360) this.rotation = 0;
		}
	}
}
